package com.mingqijia.gassafety.authority.api.req.manager;

import com.mingqijia.gassafety.shared.constant.Constants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

/**
 * 更新数据请求
 * @author Damon S.
 * @version v0.2
 * @date 2021-06-19
 */
@Data
@ApiModel(value = "更新用户请求")
public class UpdateManagerReqDTO implements Serializable {
    @NotNull(message = "用户ID不能为空")
    @ApiModelProperty(value = "用户ID", required = true)
    private String userId;

    @ApiModelProperty(value = "姓名")
    @Pattern(regexp = Constants.REGEXP_NAME, message = "姓名应满足2-16位汉字、字母、数字")
    private String name;

    @ApiModelProperty(value = "手机号码")
    @Pattern(regexp = Constants.REGEXP_PHONE, message = "手机号码不合法")
    private String phone;

    @ApiModelProperty(value = "所属组织")
    private List<String> hierarchy;

    @ApiModelProperty(value = "所属部门，企业级账户必填")
    private List<String> department;

    @ApiModelProperty(value = "所属角色列表")
    private List<String> roleId;

    @ApiModelProperty(value = "状态(1-激活，0冻结)")
    @Max(value = 1, message = "状态值不合法")
    private Integer state;

    @ApiModelProperty(value = "说明信息")
    @Pattern(regexp = "^.{0,200}$", message = "说明超过200字限制")
    private String description;
}
